/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.BioTransformerSequenceStep;
import io.sirius.ms.sdk.model.Cyp450Mode;
import io.sirius.ms.sdk.model.P2Mode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * BioTransformerParameters
 */
@JsonPropertyOrder({
  BioTransformerParameters.JSON_PROPERTY_CYP450_MODE,
  BioTransformerParameters.JSON_PROPERTY_P2_MODE,
  BioTransformerParameters.JSON_PROPERTY_USE_D_B,
  BioTransformerParameters.JSON_PROPERTY_BIO_TRANSFORMER_SEQUENCE_STEPS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class BioTransformerParameters {
  public static final String JSON_PROPERTY_CYP450_MODE = "cyp450Mode";
  @jakarta.annotation.Nullable
  private Cyp450Mode cyp450Mode = Cyp450Mode.COMBINED;

  public static final String JSON_PROPERTY_P2_MODE = "p2Mode";
  @jakarta.annotation.Nullable
  private P2Mode p2Mode = P2Mode.BT_RULE_BASED;

  public static final String JSON_PROPERTY_USE_D_B = "useDB";
  @jakarta.annotation.Nullable
  private Boolean useDB = true;

  public static final String JSON_PROPERTY_BIO_TRANSFORMER_SEQUENCE_STEPS = "bioTransformerSequenceSteps";
  @jakarta.annotation.Nonnull
  private List<BioTransformerSequenceStep> bioTransformerSequenceSteps = new ArrayList<>();

  public BioTransformerParameters() {
  }

  public BioTransformerParameters cyp450Mode(@jakarta.annotation.Nullable Cyp450Mode cyp450Mode) {
    
    this.cyp450Mode = cyp450Mode;
    return this;
  }

  /**
   * Get cyp450Mode
   * @return cyp450Mode
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CYP450_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public Cyp450Mode getCyp450Mode() {
    return cyp450Mode;
  }


  @JsonProperty(JSON_PROPERTY_CYP450_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setCyp450Mode(@jakarta.annotation.Nullable Cyp450Mode cyp450Mode) {
    this.cyp450Mode = cyp450Mode;
  }

  public BioTransformerParameters p2Mode(@jakarta.annotation.Nullable P2Mode p2Mode) {
    
    this.p2Mode = p2Mode;
    return this;
  }

  /**
   * Get p2Mode
   * @return p2Mode
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_P2_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public P2Mode getP2Mode() {
    return p2Mode;
  }


  @JsonProperty(JSON_PROPERTY_P2_MODE)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setP2Mode(@jakarta.annotation.Nullable P2Mode p2Mode) {
    this.p2Mode = p2Mode;
  }

  public BioTransformerParameters useDB(@jakarta.annotation.Nullable Boolean useDB) {
    
    this.useDB = useDB;
    return this;
  }

  /**
   * \&quot;Specify if you want to enable the retrieving from database (HMDB) feature.\&quot;
   * @return useDB
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_USE_D_B)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean isUseDB() {
    return useDB;
  }


  @JsonProperty(JSON_PROPERTY_USE_D_B)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUseDB(@jakarta.annotation.Nullable Boolean useDB) {
    this.useDB = useDB;
  }

  public BioTransformerParameters bioTransformerSequenceSteps(@jakarta.annotation.Nonnull List<BioTransformerSequenceStep> bioTransformerSequenceSteps) {
    
    this.bioTransformerSequenceSteps = bioTransformerSequenceSteps;
    return this;
  }

  public BioTransformerParameters addBioTransformerSequenceStepsItem(BioTransformerSequenceStep bioTransformerSequenceStepsItem) {
    if (this.bioTransformerSequenceSteps == null) {
      this.bioTransformerSequenceSteps = new ArrayList<>();
    }
    this.bioTransformerSequenceSteps.add(bioTransformerSequenceStepsItem);
    return this;
  }

  /**
   * Specify BioTransformerSequenceSteps to be applied to input structures. MultiStep MetabolicTransformations can  only be used as singletons (list size of one).
   * @return bioTransformerSequenceSteps
   */
  @jakarta.annotation.Nonnull
  @JsonProperty(JSON_PROPERTY_BIO_TRANSFORMER_SEQUENCE_STEPS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)

  public List<BioTransformerSequenceStep> getBioTransformerSequenceSteps() {
    return bioTransformerSequenceSteps;
  }


  @JsonProperty(JSON_PROPERTY_BIO_TRANSFORMER_SEQUENCE_STEPS)
  @JsonInclude(value = JsonInclude.Include.ALWAYS)
  public void setBioTransformerSequenceSteps(@jakarta.annotation.Nonnull List<BioTransformerSequenceStep> bioTransformerSequenceSteps) {
    this.bioTransformerSequenceSteps = bioTransformerSequenceSteps;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    BioTransformerParameters bioTransformerParameters = (BioTransformerParameters) o;
    return Objects.equals(this.cyp450Mode, bioTransformerParameters.cyp450Mode) &&
        Objects.equals(this.p2Mode, bioTransformerParameters.p2Mode) &&
        Objects.equals(this.useDB, bioTransformerParameters.useDB) &&
        Objects.equals(this.bioTransformerSequenceSteps, bioTransformerParameters.bioTransformerSequenceSteps);
  }

  @Override
  public int hashCode() {
    return Objects.hash(cyp450Mode, p2Mode, useDB, bioTransformerSequenceSteps);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class BioTransformerParameters {\n");
    sb.append("    cyp450Mode: ").append(toIndentedString(cyp450Mode)).append("\n");
    sb.append("    p2Mode: ").append(toIndentedString(p2Mode)).append("\n");
    sb.append("    useDB: ").append(toIndentedString(useDB)).append("\n");
    sb.append("    bioTransformerSequenceSteps: ").append(toIndentedString(bioTransformerSequenceSteps)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

